package com.iraeta.service.erp.impl;

import com.iraeta.dao.erp.CaigouorderDao;
import com.iraeta.entity.erp.Caigouorder;
import com.iraeta.service.erp.CaigouorderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class CaigouorderServiceImpl implements CaigouorderService {
    @Resource
    CaigouorderDao caigouorderDao;

    @Override
    public int add(Caigouorder record) {
        return caigouorderDao.insert(record);
    }

    @Override
    public int update(Caigouorder record) {
        return caigouorderDao.updateByPrimaryKey(record);
    }

    @Override
    public int delete(Long id) {
        return caigouorderDao.deleteByPrimaryKey(id);
    }

    @Override
    public Caigouorder getById(Long id) {
        return caigouorderDao.selectByPrimaryKey(id);
    }
}
